package yhk;

import cn.sh.yhk.service.HiService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class controller {

    @Reference(loadbalance="random",timeout=1000,version = "1.0.0") //dubbo直连
            HiService hiService;


    @ResponseBody  //以json格式返回
    @RequestMapping("/2222")
    public String initOrder(){
        return hiService.hi("11111");
    }
}
